<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        // var arr=[2,3,4,5]
        // var value=arr.find(item=>item==5)
        // console.log(value)
        /* findIndex */
        var arr=[{id:001,content:"vue"},{id:002,content:"react"},{id:003,content:"small"}]
        var index=arr.findIndex(item=>item.id==001)
        console.log(index)
    </script>
</body>
</html>